﻿<UserControl x:Class="ScrumFactory.Projects.RepositoryLogSettings"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:props="clr-namespace:ScrumFactory.Projects.Properties"    
             mc:Ignorable="d" 
             d:DesignHeight="192" d:DesignWidth="703">
    <Grid Width="700">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>

        <Border Grid.ColumnSpan="2" Grid.Row="0" Margin="6,6,6,0">
            <TextBlock Text="{x:Static props:Resources.External_command_error}" />
            <Border.Style>
                <Style BasedOn="{StaticResource AlertBorder}" TargetType="Border">                                    
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ShowErrorMessage}" Value="False">
                            <Setter Property="Border.Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>
        </Border>
        
        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" Grid.Row="1" Margin="6">
            <Image Source="/Images/information.png"  Width="16" Height="16" Margin="0,0,10,0"/>
            <TextBlock Text="{x:Static props:Resources.External_command_tooltip}" 
                       FontSize="{StaticResource SmallFontSize}"
                       Foreground="{StaticResource SubTextBrush}" TextWrapping="Wrap" Width="680"/>
        </StackPanel>

        <TextBlock 
            Grid.Column="0" Grid.Row="2"  VerticalAlignment="Center"
            Text="{x:Static props:Resources.External_command}" Style="{StaticResource LabelTextBlock}"/>
        <TextBox
            Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"
            Text="{Binding ExternalCommand}" HorizontalAlignment="Stretch"/>

        <Border
                Grid.ColumnSpan="2" Grid.Row="3"
                HorizontalAlignment="Stretch" 
                Background="{StaticResource WindowButtonBar}">

            <Button
                    MinWidth="80" Margin="5" HorizontalAlignment="Center"
                    Command="{Binding SaveSettingsCommand}"
                    Content="{x:Static props:Resources.Save}"/>
        </Border>


    </Grid>
</UserControl>
